Problem Note 45360: Code might be incorrectly parsed when a macro variable definition includes an %STR function when used with the SQL procedure
Using the SQL procedure (PROC) to subset a table using a macro variable that contains a DATETIME constant within the %STR function might result in an error. The problem occurs if the DATETIME constant within the %STR function does not include the quotation marks and the DT. These are used to signify that the literal is a DATETIME constant. Under these circumstances, you might see the following error:
ERROR: Expression using greater than (>) has components that are of different
data types.
This problem occurs when the DT from the original PROC SQL code is removed from the DATETIME constant after the code has been parsed by the SQL procedure. As a result, the constant value is treated as a character literal and not as a DATETIME constant.
To work around this issue, include the quotation marks and the DT in the original macro definition rather than in the PROC SQL code.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
Windows Vista | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
Windows Vista for x64 | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
64-bit Enabled AIX | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
64-bit Enabled HP-UX | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
64-bit Enabled Solaris | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
HP-UX IPF | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
Linux | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
Linux on Itanium | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
OpenVMS Alpha | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
Solaris for x64 | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
Tru64 UNIX | 9.1 TS1M3 SP4 | 9.3 TS1M2 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2012-01-19 10:46:12 |
Date Created: | 2012-01-11 12:06:45 |